<template>
  <div id="layout" class="layout" >
    <div class="layout-header"></div>
    <div class="layout-body">
        <slot name="main">
             <div>我是父组件里的文字，但是我要被放到子组件里</div>
        </slot>
    </div>
    <div class="layout-footer"></div>
  </div>
</template>

<script>
export default {
  data() {
    return {};
  },
  mounted() {},
  computed: {}
};
</script>


<style>
.layout {
  /* height: 100%; */
}

.layout-header {
  height: 80px;
  background-color: black;
}

.layout-body {
  /* height: calc(100% - 140px); */
  /* min-height: 500px; */
  background-color: white;
  width: 1200px;
  height: auto;
  padding: 10px;
}

.layout-footer {
  height: 60px;
  background-color: lightpink;
}
</style>